package com.leo.demo.json;

import java.io.Serializable;

/**
 * @descript 响应对象
 * @author : weijie.jiang
 */
public class ResultModel implements Serializable {

    public static final int SUCCESS = 0;

    /**
     * 状态码，默认 0表示成功
     */
    private int ret = 0;

    /**
     * 错误描述
     */
    private String msg = "";

    /**
     * 成功返回数据
     */
    private Object data;

    public ResultModel() {}

    public ResultModel(Object data) {

        this.data = data;
    }

    public ResultModel(int ret, String msg) {
        setRet(ret);
        setMsg(msg);
    }

    public int getRet() {
        return ret;
    }

    public void setRet(int ret) {
        this.ret = ret;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
